package com.easy.sk.service;

import com.easy.common.service.SKService;
import com.easy.common.util.SYS;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SKServiceImpl implements SKService {
    @Autowired
    RabbitTemplate rabbitTemplate;
    @Override
    public void sendMSG(String msg) {
        //发送消息到MQ
        rabbitTemplate.convertAndSend(SYS.SK_EXCHANGE,SYS.SK_ROUTING_KEY,msg);
        System.out.println("发送消息："+msg);
    }
}
